class EsDate{
    dateToTime(dateStr){
        return Math.floor(new Date(dateStr).getTime()/1000);
    }
    timeToDate(timestamp){
        return new Date(timestamp).toISOString().slice(0, -5).replace('T', ' ');
    }
}

module.exports = new EsDate();